package com.southwind.configuration;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanConfiguration {
    public static void main(String[] args) {
        // 加载Spring配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");

        // 获取并调用MyBean
        MyBean myBean = (MyBean) context.getBean("myBean");
        myBean.sayHello();
    }
}
